<html>
<head><meta charset="utf-8"><title>Issue #60619 · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Issue.20.2360619.html">Issue #60619</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="166724929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Issue%20%2360619/near/166724929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> yodal <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Issue.20.2360619.html#166724929">(May 28 2019 at 14:59)</a>:</h4>
<p>Hello folks,</p>
<p>The issue in question (<a href="https://github.com/rust-lang/rust/issues/60619" target="_blank" title="https://github.com/rust-lang/rust/issues/60619">rust-lang/rust#60619</a>) relates to const generics, but due to the area the problem touches I think asking around here makes sense.</p>
<p>The last comment on that issue lays out as clearly as I can what is going on, but as a quick summary: const eval of array lengths is failing during wf checking if the length is an equation with a const param in it.</p>



<a name="166725426"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Issue%20%2360619/near/166725426" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> yodal <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Issue.20.2360619.html#166725426">(May 28 2019 at 15:04)</a>:</h4>
<p>That const eval fails is expected as monomorphization has not happened (and in the case of the test case it never will), but this does mean that an obligation that the length is evaluatable is never satisfied. It is my understanding that wf checks should not care if we can evaluate the length, only that any parameters are from the right scope. Is this correct?</p>



<a name="166725625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Issue%20%2360619/near/166725625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> yodal <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Issue.20.2360619.html#166725625">(May 28 2019 at 15:06)</a>:</h4>
<p>Lastly, whether or not that is the case, does anyone see a good way to more forward on this? I suggested that maybe const evaluation needs to note what parameters are too generic so that wf checking can makes sure they are in scope, but I'm not sure if that would be the right way forward. Thoughts?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>